<?php
namespace app\api\validate;
use think\Validate;

class Picture extends Validate
{
    protected $rule = [
        'type'          =>  'require|in:storage,list',
        'chatid'        =>  'require',
        'unique_id'     =>  'require',
    ];

    protected $message = [
        'type.require'    => '列表类型参数不能为空!',
        'type.in'         => '列表类型参数错误!',
        'chatid.require'  => '会话ID参数不能为空!',
        'unique_id.require'  => '图片ID参数不能为空!',
    ];

    protected $scene = [
        'index'         =>  ['type'],
        'delete'        =>  ['chatid'],
        'poll'          =>  ['unique_id'],
    ];    
}